<template>
    <div class="box">
        <Swiper :list = "list"></Swiper>
        <Blocknav :list = "blockList"></Blocknav>
        <Title titleIcon="icon-xinwen">{{$t("column.news")}}</Title>
        <Textlist :list = "textlist"></Textlist>
        <Title titleIcon="icon-shangpu">{{$t("column.exhibitors")}}</Title>
        <Collapse :list = "exhibitors"></Collapse>
        <Title titleIcon="icon-service">{{$t("column.exhibits")}}</Title>
        <Imgtextlist :list = "imgtextlist"></Imgtextlist>
    </div>
</template>
<script>
import Swiper from './common/Swiper'
import Blocknav from './common/Blocknav'
import Textlist from './common/Textlist'
import Title from './common/Title'
import Collapse from './common/Collapse'
import Imgtextlist from './common/Imgtextlist'
import axios from 'axios'
export default {
    data(){
        return {
            list:[],
            blockList:[],
            textlist:[],
            exhibitors:[],
            imgtextlist:[]
        }
    },
    components:{
        Swiper,
        Blocknav,
        Textlist,
        Title,
        Collapse,
        Imgtextlist
    },
    methods :{
        getHomeInfo(){
            axios.get('/api/index.json')
            .then(this.getHomeInfoSucc)
        },
        getHomeInfoSucc(res){
            res = res.data
            if(res.ret && res.data){
                var data = res.data
                this.list = data.swiperList
                this.blockList = data.blockList
                this.textlist = data.textlist
                this.exhibitors = data.exhibitors
                this.imgtextlist = data.imgtextlist
            }
        }
    },
    mounted :function() {
        this.getHomeInfo()
    }
}
</script>
<style>
.box {
  margin-bottom: 80px; }
</style>
